package task

type runModeEnum = string

type runEnum struct {
	NONE runModeEnum
	IN   runModeEnum
	OUT  runModeEnum
	MOVE runModeEnum
}

// 运行模式枚举
var RunModeEnum = &runEnum{
	NONE: "NONE",
	IN:   "IN",
	OUT:  "OUT",
	MOVE: "MOVE",
}

var runModeMap = map[runModeEnum]string{
	RunModeEnum.NONE: "无",
	RunModeEnum.IN:   "入",
	RunModeEnum.OUT:  "出",
	RunModeEnum.MOVE: "移",
}

//获取其对应中文描述
func GetRunModeDesc(code runModeEnum) string {
	if mode, ok := runModeMap[code]; ok {
		return mode
	} else {
		return "未知类型"
	}
}
